package my.package0407;

import java.util.Scanner;

public class dome01 {
    public static void main(String[] args) {
    getSJXarea();
    getZFXarea();
    getCFXarea();
}
    public static void getSJXarea () {
        Scanner SC =new Scanner(System.in);
        System.out.println("Enter the bottom of the triangle:");
        double a = SC.nextDouble();
        System.out.println("Enter the height of the triangle:");
        double b =SC.nextDouble();
        System.out.println("The area of the triangle is:" + (a*b*0.5));
    }
    public static void getZFXarea (){
        Scanner SC =new Scanner(System.in);
        System.out.println("Enter the side length of the square:");
        double a =SC.nextDouble();
        System.out.println("The area of the square is:" + (a*a));
    }
    public static void getCFXarea(){
        Scanner SC =new Scanner(System.in);
        System.out.println("Enter the length of the rectangle:" );
        double a =SC.nextDouble();
        System.out.println("Enter the width of the rectangle:");
        double b =SC.nextDouble();
        System.out.println("The area of the rectangle is:"+(a*b));
    }
}
